package com.wang.adapter;


public class ObjectAdapter {
    public static void main(String[] args) {
        Traget traget = new Adapter5(new Adaptere());
        traget.output5();
    }


}

class Adaptere{
    void output220(){
        System.out.println("220V");
    }
}

interface Traget{
    void output5();
}

class Adapter5 implements Traget{

    Adaptere adaptere;

    public Adapter5(Adaptere adaptere){
        this.adaptere = adaptere;
    }

    @Override
    public void output5() {
        adaptere.output220();
        System.out.println("处理…………");
        System.out.println("c输出5v");
    }
}
